import wangyiRequest from '../../utils/wangyiRequest'

interface recommendData {
  tagList: [
    {
      floorPrice: 39.9
      picUrl: 'https://yanxuan.nosdn.127.net/c097be14110f769d58245cdad73e15c3.png'
      newOnShelf: false
      webIndexVerticalPicUrl: 'https://yanxuan.nosdn.127.net/c097be14110f769d58245cdad73e15c3.png'
      simpleDesc: '严选寻访Calvin Klein品牌的制造商，\n深入世界领带第一生产地，设计与品质并重，\n致力于给消费者带来优质典雅的服饰用品。'
      name: 'CK制造商'
      appListPicUrl: 'https://yanxuan.nosdn.127.net/61f5523c9988ae6720da4c3c81a37386.jpg'
      id: 1026000
    }
  ]
  // 下方两个图片的数据
  bigPromotionModule: {
    floorList: [
      {
        layout: 2
        cells: [
          {
            subTitleColor: ''
            rcmdItem: true
            schemeUrl: 'https://act.you.163.com/act/pub/ssr/UgC7blcfGmSL.html?appConfig=1_1_1'
            title: ''
            picUrl: 'https://yanxuan.nosdn.127.net/static-union/166996826438ac1a.gif'
            rcmdSort: false
            itemCnt: 20
            itemFrom: 1
            subTitle: ''
            titleColor: ''
            showPrice: false
            extra: {
              crmType: 0
              resource: {
                materialContentFrom: 1
                materialName: '网易严选2022年双12美好生活节'
                rcmdSort: false
                taskType: 1
                itemFrom: 1
                crmUserGroupName: '无分组'
                resourcesId: 1
                materialType: '首页大促模块'
                schemeUrl: 'https://act.you.163.com/act/pub/ssr/UgC7blcfGmSL.html?appConfig=1_1_1'
                crmUserGroupId: '0'
                materialId: '54705689'
                taskId: '54703399'
              }
              modelType: 1
            }
            popupUrl: ''
            leftTime: 0
            itemList: [
              {
                primarySkuPreSellStatus: 0
                picUrl: 'https://yanxuan-item.nosdn.127.net/b02ffa37fc937b897f1c53823756a7ba.png'
                pieceUnitDesc: '件'
                pieceNum: 0
                colorNum: 0
                schemeUrl: 'https://act.you.163.com/act/pub/ssr/UgC7blcfGmSL.html?appConfig=1_1_1'
                primarySkuPreSellPrice: 0
                id: 4009679
              },
              {
                primarySkuPreSellStatus: 0
                picUrl: 'https://yanxuan-item.nosdn.127.net/c09d6903afaed676812b40c1675804a2.png'
                pieceUnitDesc: '件'
                pieceNum: 0
                colorNum: 0
                schemeUrl: 'https://act.you.163.com/act/pub/ssr/UgC7blcfGmSL.html?appConfig=1_1_1'
                primarySkuPreSellPrice: 0
                id: 4054974
              }
            ]
            id: 'UgC7blcfGmSL'
            targetUrl: 'https://act.you.163.com/act/pub/ssr/UgC7blcfGmSL.html?appConfig=1_1_1'
          }
        ]
        columnNum: 1
        floorType: 0
        style: 1
        taskId: 54703399
        height: 300
      }
    ]
  }
  //中间三个小图标加 字
  policyDescList: [
    {
      icon: string
      schemeUrl: string
      desc: string
    }
  ]
  popularItemList: []
  // // 导航栏的名字以及id
  categoryHotSellModule: {
    titleTargetUrl: string
    categoryList: [
      {
        picUrl: string
        extra: {
          crmType: number
          operationResource: {
            itemIdList: []
            categoryName: string
            categoryId: string
          }
          modelType: 5
        }
        itemPicBeanList: [
          {
            itemId: number
            picUrl: string
          }
        ]
        categoryName: string
        targetUrl: string
        showPicUrl: string
      }
    ]
    title: '类目热销榜'
  }
  freshmanFlag: true
  focusList: []
  // 尾部的两个图片
  sceneLightShoppingGuideModule: [
    {
      styleBanner: {
        descColor: '7f7f7f'
        picUrl: 'https://yanxuan.nosdn.127.net/static-union/1665495820b48c01.png'
        titleColor: '333333'
        extra: {
          materialContentFrom: 1
          materialName: '日常-服配-潮流馆_1011-1020'
          rcmdSort: false
          taskType: 1
          itemFrom: 0
          crmUserGroupName: ''
          resourcesId: 1
          materialType: '场景轻导购'
          crmUserGroupId: '0'
          materialId: '54701936'
          taskId: '54694648'
        }
        originSchemeUrl: 'https://act.you.163.com/act/pub/ssr/eRz0qfQcDFDM.html?appConfig=1_1_1'
        title: '穿新衣'
        targetUrl: 'https://act.you.163.com/act/pub/ssr/eRz0qfQcDFDM.html?appConfig=1_1_1'
        desc: '2件75折'
      }
    },
    {
      styleItem: {
        descColor: 'ff6f0f'
        itemFrom: 1
        picUrlList: [
          'https://yanxuan-item.nosdn.127.net/d398ebb1be7fd30f1e3c2a41b30c4ba9.png',
          'https://yanxuan-item.nosdn.127.net/e9f01fb9a3d9e18f7a42dd9231390beb.png'
        ]
        titleColor: '333333'
        extra: {
          materialContentFrom: 1
          materialName: '日常-众筹-轻导购_0219-0331'
          rcmdSort: false
          taskType: 1
          itemFrom: 0
          crmUserGroupName: ''
          resourcesId: 2
          materialType: '场景轻导购'
          crmUserGroupId: '0'
          materialId: '54688130'
          taskId: '54693620'
        }
        itemPicBeanList: [
          {
            itemId: 4029191
            picUrl: 'https://yanxuan-item.nosdn.127.net/d398ebb1be7fd30f1e3c2a41b30c4ba9.png'
          },
          {
            itemId: 4034696
            picUrl: 'https://yanxuan-item.nosdn.127.net/e9f01fb9a3d9e18f7a42dd9231390beb.png'
          }
        ]
        originSchemeUrl: 'https://act.you.163.com/act/pub/slxlBtBEld8G.html?appConfig=1_1_1'
        title: '严选众筹'
        targetUrl: 'https://act.you.163.com/act/pub/slxlBtBEld8G.html?appConfig=1_1_1'
        desc: '探索美与用'
      }
    }
  ]
  kingKongModule: {
    norColor: 'ff000000'
    background: 'https://yanxuan.nosdn.127.net/fe0bd37a552434cc0d27c1889ff3e1fe.png'
    kingKongList: [
      //十个图片
      {
        picUrl: 'https://yanxuan.nosdn.127.net/c6fd8835a6400b7da7a016ad85506b69.png'
        schemeUrl: 'https://m.you.163.com/item/newItem'
        text: '新品首发'
        textColor: '333333'
      }
    ]
    selectedColor: 'ffffffff'
  }
  indexActivityModule: [
    {
      backgroundUrl: ''
      picUrl: 'https://yanxuan-item.nosdn.127.net/6b9d93eae44995e560bcaf9154becee4.png'
      activityPrice: '¥16.8'
      subTitle: '今日特价'
      originPrice: '¥18'
      tag: ''
      title: '福利社'
      targetUrl: 'https://m.you.163.com/saleCenter/index'
      showPicUrl: 'https://yanxuan-item.nosdn.127.net/6b9d93eae44995e560bcaf9154becee4.png'
    },
    {
      picUrl: 'https://yanxuan-item.nosdn.127.net/800d7fac7628f85ba0906af704f52c89.png'
      activityPrice: '¥200'
      subTitle: ''
      originPrice: '¥269'
      tag: '1元起包邮'
      title: '新人拼团'
      targetUrl: 'https://m.you.163.com/pin/item/list'
      showPicUrl: 'https://yanxuan-item.nosdn.127.net/5f38f682ca87f312e80141222ebbd86d.png'
    }
  ]
}

export default {
  // 首页
  recommend() {
    return wangyiRequest.get<any, any>('/xhr/index.json?__timestamp=1630131808529')
  },
  //  居家生活页
  itemlist(id: number) {
    return wangyiRequest.get<any, any>(`/item/list.json?__timestamp=1630136511866&categoryId=${id}`)
  }
}
